{include file="public_iframe:head"}
<script src="__STATIC__/laydate/laydate.js"></script>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>任务审核</h5>
            <div class="ibox-tools" style="margin-top: -9px;">
                <a href="javascript:location.reload();" class="btn btn-primary"><i class="fa fa-refresh"></i> 刷新</a>
            </div>
        </div>
        <div class="ibox-content">
                <div class="row">
                        <div class="col-sm-3">
                        </div>
                        <form class="form-inline" action="" method="get">
                            <div class="col-sm-10 pull-right">
                                <div class="input-group pull-right select_width">
                                    <span class="input-group-btn" >
                                      <button type="submit" class="btn btn-sm btn-primary"> 搜索
                                      </button>
                                    </span>
                                </div>
                                <div class="input-group col-sm-4 pull-right select_width" >
                                    <span>
                                        <input class="form-control input-sm select_no_border" placeholder="用户名搜索" name="account" type="text" value="{$account?$account:''}">
                                    </span>
                                    <span>
                                        <select name="status" class="form-control input-sm select_no_border">
                                            <option value="">审核状态</option>
                                            <option value="2" {if condition="$status eq 1"}selected = "selected"{/if}>通过审核</option>
                                            <option value="3" {if condition="$status eq 2"}selected = "selected"{/if}>拒绝通过</option>
                                        </select>
                                    </span>
                                </div>
                            </div>
                        </form>
                    </div>
                    <a class="btn btn-primary" href="{:url('Mission/mission_export')}">导出Excel</a>
                    <br />

                    <div class="table-responsive">
                        <!--class="table table-bordered table-hover"-->
                        <table data-toggle="table" class="table table-bordered table-hover"
                        >
                                <thead>
                                <tr  style="background: #f9f9f9;">
                                    <th>编号</th>
                                    <th>用户ID</th>

                                    <th>用户</th>
                                    <th>审核状态</th>
                                    <th>任务内容</th>
                                    
                                    <th>图片</th>
                                    <th>佣金</th>
                                    <th>提交时间</th>
                                  <!--   <th>操作</th> -->
                                </tr>
                                </thead>
                                <tbody>
                                {volist name="list" id="vo"}
                                <tr>
                                    <td>{$vo.id}</td>
                                    <td>{$vo.uid?$vo.uid:''}</td>
                                    <th>{$vo.account?$vo.account:''}</th>
                                    <td>

                                        {switch name="$vo.status"}
                                   
                                            {case value="2"}审核通过{/case}
                                            {case value="3"}审核不通过{/case}
                                            {default /}
                                        {/switch}
                                    </td>
                                    <td>{$vo.content}</td>
                                   <!--  <td>{$vo.task_record_id}</td> -->
                                    <td style="width: 400px;">
                                        {if condition="!empty($vo.img_array)"}
                                            {volist name="$vo.img_array" id="img"}
                                            <img alt="image" style="width:60px;height:60px;" class="" src="{$img['task_img']}">
                                            {/volist}
                                        {/if}
                                    </td>
                                    <td>{$vo.money}</td>
                                    <td>{$vo.created_at|date="Y-m-d H:i:s",###}</td>
                         <!--            <td class="center" width="180">
                                          {switch name="$vo.status"}
                                            {case value="1"}
                                                <a href="{:url('Mission/edit_examine',array('id'=>$vo['id']))}" class="btn btn-primary">查看审核</a>
                                            {/case}
                                            {case value="2"}

                                                <a href="#" class="btn btn-primary">审核通过</a>
                                            {/case}
                                          
                                            {default /}
                                        {/switch}
                                        
                                        <a href="#" class="btn btn-danger" id="btn-danger" data-id="{$vo.id}" >删除</a>
                                    </td> -->
                                </tr>
                                {/volist}
                                </tbody>
                                <!-- <input type="submit" id="test2" name="" onclick=""> -->
                        </table>
                    </div>
                </div>
                <div class="col-sm-12">
                    <!-- Example Pagination -->
                    <ul class="pagination  pull-right">
                        {$page}
                    </ul>
                    <!-- End Example Pagination -->
                </div>
            </div>
        </div>
    </div>
    <!-- End Panel Basic -->
</div>

<!-- 全局js -->
<script src="__STATIC__/admin/js/jquery.min.js?v=2.1.4"></script>
<script src="__STATIC__/admin/js/bootstrap.min.js?v=3.3.6"></script>
<script>
    //删除
    $(".btn-danger").click(function(){
        var id = $(this).attr('data-id');
        parent.layer.confirm('删除数据无法恢复，并且会影响用户数据，确定删除？', {
            shade:false,
            btn: ['确定', '取消']
        }, function() {
            $.post("{:url('Mission/delexamine')}", {id: id}, function (result) {
                if (result.code == '0') {
                    parent.layer.alert(result.msg);
                } else {
                    parent.layer.msg(result.msg, {
                                icon:1
                            },
                            function (index, item) {
//                              parent.layer.close(index);
                                location.reload();
                            });
                }
            });
        });
    })
</script>
</body>

</html>
